<?php

namespace App\Kuafu\Base\Model\Traits;

trait KfSoftDeletes
{
    public static function bootKfSoftDeletes()
    {
        // where 表名.isDeleted = 0
        static::addGlobalScope('isDel', function ($builder) {
            $builder->where($builder->getModel()->getTable() . '.isDeleted', 0);
        });
    }
}
